package jgl.vajra.management.part.home.model;

import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.management.bean.ListeningSettingBean;
import jgl.vajra.management.manager.AccountManager;
import jgl.vajra.management.part.home.contract.ListeningSettingContract;
import jgl.vajra.management.widget.manager.RxJavaHttpManager;
import jgl.vajra.management.widget.manager.retrofit.RetrofitJsonManager;
import jgl.vajra.management.widget.utils.UIUtils;

public class ListeningSettingModel extends ListeningSettingContract.Model{
    @Override
    public Observable<String> determineListeningSetting(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().determineListeningSetting(map, AccountManager.getInstance().getLoginData(UIUtils.getContext()).authorization)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<ListeningSettingBean> getDetermineListeningSetting(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getDetermineListeningSetting(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
